// pages/index9/index9.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list: [],
    id: 0
  },


  async onLoad(options) {
    this.data.id = options.id
    const res = await this.getDataList()
    this.setData({
      list: res.data
    })
  },
  async getDataList() {
    const promise = new Promise(resolve => {
      wx.request({
        url: 'https://api-vue-base.itheima.net/api/lol/info',
        data: {
          id: this.data.id
        },
        success: (res => {
          resolve(res.data)
        })
      })

    })
    return promise

  }

})